<?php
if(in_array($controller, array("bookhistory"))){
    if($this->input->post('beginTime') || $this->input->post('endTime')){
        $this->session->set_userdata('bookhistory_time', json_encode(array('beginTime'=>strtotime($this->input->post('beginTime')),'endTime'=>strtotime($this->input->post('endTime').' 24:00:00'))));
    }
    if($this->input->post('customerID')){
        $this->session->set_userdata('bookhistory_customerID', json_encode(array('customerID'=>$this->input->post('customerID'))));
    }
    if($this->input->post('booking_place_code')){
        $this->session->set_userdata('bookhistory_booking_place_code', json_encode(array('booking_place_code'=>$this->input->post('booking_place_code'))));
    }
    if($this->input->post('userid')){
        $this->session->set_userdata('bookhistory_userid', json_encode(array('userid'=>$this->input->post('userid'))));
    }
    if($this->input->post('payment_method')){
        $this->session->set_userdata('bookhistory_payment_method', json_encode(array('payment_method'=>$this->input->post('payment_method'))));
    }

}